<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        h2 {
            text-align: center;
        }

        table {
            border-collapse: collapse;
            height: 80px;
            margin: 0 auto;

        }

        table,
        tr,
        th {
            border: 1px solid red;
        }
    </style>
</head>

<body>
    <h2>订单确认</h2>
    <script>
        let name = prompt('请输入商品名称')
        let price = +prompt('请输入商品价格')
        let num = +prompt('请输入商品数量')
        let adress = prompt('请输入收货地址')
        let sum = price * num
        document.write(`
            <table>
        <tr>
            <th>商品名称</th>
            <th>商品价格</th>
            <th>商品数量</th>
            <th>总价</th>
            <th>收货地址</th>
        </tr>
        <tr>
            <th class="name">${name}</th>
            <th>${price}</th>
            <th>${num}</th>
            <th>${sum}</th>
            <th>${adress}</th>
        </tr>
        <tr>
            <th class="name">${name}</th>
            <th>${price}</th>
            <th>${num}</th>
            <th>${sum}</th>
            <th>${adress}</th>
        </tr>
        <tr>
            <th class="name">${name}</th>
            <th>${price}</th>
            <th>${num}</th>
            <th>${sum}</th>
            <th>${adress}</th>
        </tr>
        <tr>
            <th class="name">${name}</th>
            <th>${price}</th>
            <th>${num}</th>
            <th>${sum}</th>
            <th>${adress}</th>
        </tr>
        <tr>
            <th class="name">${name}</th>
            <th>${price}</th>
            <th>${num}</th>
            <th>${sum}</th>
            <th>${adress}</th>
        </tr>
        <tr>
            <th class="name">${name}</th>
            <th>${price}</th>
            <th>${num}</th>
            <th>${sum}</th>
            <th>${adress}</th>
        </tr>
        <tr>
            <th class="name">${name}</th>
            <th>${price}</th>
            <th>${num}</th>
            <th>${sum}</th>
            <th>${adress}</th>
        </tr>
        <tr>
            <th class="name">${name}</th>
            <th>${price}</th>
            <th>${num}</th>
            <th>${sum}</th>
            <th>${adress}</th>
        </tr>
    </table>

    ` )
    </script>
</body>

</html>